package com.aleaho.cftrack.model;

import com.aleaho.cftrack.CFTrackApplication;
import com.baidu.trace.api.analysis.DrivingBehaviorRequest;
import com.baidu.trace.api.analysis.OnAnalysisListener;
import com.baidu.trace.api.analysis.StayPointRequest;
import com.baidu.trace.api.track.HistoryTrackRequest;
import com.baidu.trace.api.track.OnTrackListener;

/**
 * @author Aleaho
 * @version 1.0
 * @date 2017/11/19
 * @desc
 */

public class TrackQueryModelImpl implements TrackQueryModel {


    /**
     * 查询历史轨迹
     *
     * @param trackApp
     * @param historyTrackRequest
     * @param onTrackListener
     */
    @Override
    public void queryHistoryTrack(CFTrackApplication trackApp,
                                  HistoryTrackRequest historyTrackRequest,
                                  OnTrackListener onTrackListener) {
        trackApp.mClient.queryHistoryTrack(historyTrackRequest, onTrackListener);
    }

    @Override
    public void queryDrivingBehavior(CFTrackApplication trackApp,
                                     DrivingBehaviorRequest drivingBehaviorRequest,
                                     OnAnalysisListener onAnalysisListener) {
        trackApp.mClient.queryDrivingBehavior(drivingBehaviorRequest, onAnalysisListener);
    }

    @Override
    public void queryStayPoint(CFTrackApplication trackApp,
                               StayPointRequest stayPointRequest,
                               OnAnalysisListener onAnalysisListener) {
        trackApp.mClient.queryStayPoint(stayPointRequest, onAnalysisListener);

    }


}
